all: daemonize

daemonize: daemonize.c
	$(CC) daemonize.c -o daemonize

daemonize.ps: daemonize.1
	groff -mandoc $< > $@

install: daemonize daemonize.1
	install -m 755 daemonize /usr/local/bin
	install -m 644 daemonize.1 /usr/local/share/man/man1

clean:
	rm -f daemonize daemonize.pdf daemonize.ps
